package com.zbkj.common.request.project;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Auther:
 * @Date: 2024/7/9 16:17
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "AdminReportRequest对象", description = "服务端项目报告提交保存请求对象")
public class AdminReportRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("项目ID")
    @NotNull(message = "缺少项目ID参数")
    private Long projectId;

    @ApiModelProperty("软件估算价值(下限)")
    @NotNull(message = "软件估算价值(下限)不能为空")
    private BigDecimal estimCostMin;

    @ApiModelProperty("软件估算价值(中值)")
    @NotNull(message = "软件估算价值(中值)不能为空")
    private BigDecimal estimCostMid;

    @ApiModelProperty("软件估算价值(上限)")
    @NotNull(message = "软件估算价值(上限)不能为空")
    private BigDecimal estimCostMax;

    /*@ApiModelProperty("成本金额")
    @NotNull(message = "成本金额不能为空")
    private BigDecimal costAmount;

    @ApiModelProperty("利润率单位%")
    @NotNull(message = "利润率不能为空")
    private BigDecimal profitRate;

    @ApiModelProperty("税率单位%")
    @NotNull(message = "税率不能为空")
    private BigDecimal taxRate;*/

    @ApiModelProperty("资料名称-原文件名称")
    @NotBlank(message = "缺少资料名称参数")
    private String fileName;

    @ApiModelProperty("资料存储路径")
    @NotBlank(message = "缺少资料路径参数")
    private String filePath;

    @ApiModelProperty("预估边界信息集合")
    @NotEmpty(message = "预估边界记录不能为空")
    @Valid
    List<AdminReportItemRequest> itemRequestList;

    @Setter
    @Getter
    @ApiModel(value = "AdminReportItemRequest对象", description = "服务端项目报告明细请求对象")
    public static class AdminReportItemRequest {
        @ApiModelProperty("软件预估边界")
        @NotBlank(message = "软件预估边界不能为空")
        private String bounds;

        @ApiModelProperty("规模估算结果(功能点)")
        @NotNull(message = "规模估算结果(功能点)不能为空")
        private BigDecimal funPoints;

        @ApiModelProperty("规模变更调整因子取值")
        @NotNull(message = "规模变更调整因子取值不能为空")
        private BigDecimal reuseFactor;

        @ApiModelProperty("调整后工作量(下限)")
        @NotNull(message = "调整后工作量(下限)不能为空")
        private BigDecimal valf1;

        @ApiModelProperty("调整后工作量(中值)")
        @NotNull(message = "调整后工作量(中值)不能为空")
        private BigDecimal valf2;

        @ApiModelProperty("调整后工作量(上限)")
        @NotNull(message = "调整后工作量(上限)不能为空")
        private BigDecimal valf3;

       /* @ApiModelProperty("计算机资源限制F4")
        @NotNull(message = "计算机资源限制F4不能为空")
        private BigDecimal valf4;

        @ApiModelProperty("赋值处理F5")
        @NotNull(message = "赋值处理F5不能为空")
        private BigDecimal valf5;

        @ApiModelProperty("可重用性F6")
        @NotNull(message = "可重用性F6不能为空")
        private BigDecimal valf6;

        @ApiModelProperty("多环境F7")
        @NotNull(message = "多环境F7不能为空")
        private BigDecimal valf7;*/

        @ApiModelProperty("调整后规模(功能点)")
        @NotNull(message = "调整后规模(功能点)不能为空")
        private BigDecimal adjustFactor;

        /*@ApiModelProperty("软件功能规模")
        @NotNull(message = "软件功能规模不能为空")
        private BigDecimal softwareFun;*/

        @ApiModelProperty("前端上传顺序")
        private Integer sortNum;
    }
}
